<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<body ontouchstart>
	<header class="contHeader">
		<div class="contOHeader">
			<h1>我的地址</h1>
			<div class="contOHeadBack">
				<a href="javascript:;" onclick="reloadHtml();">
					<img src="${staticPath}/images/back2.png">
				</a>
			</div>
		</div>
	</header>
	<input type="hidden" name="token" id="token" />
	<input type="hidden" name="id" id="id" value="${address.id }" />
	<div class="weui_cells weui_cells_form">
		<div class="weui_cell zc1">
			<div class="weui_cell_hd">
				<label class="weui_label" style="width: 100px; color: #333;">收货人：</label>
			</div>
			<div class="weui_cell_bd weui_cell_primary">
				<input id="name" name="name" class="weui_input" type="text" placeholder="请输入收货人姓名" value="${address.name }">
			</div>
		</div>
		<div class="weui_cell zc1">
			<div class="weui_cell_hd">
				<label class="weui_label" style="width: 100px; color: #333;">联系电话：</label>
			</div>
			<div class="weui_cell_bd weui_cell_primary">
				<input id="mobPhone" name="mobPhone" class="weui_input" type="text" placeholder="请输入收货人手机号" value="${address.mobPhone }">
			</div>
		</div>
		<div class="weui_cell zc1" style="color: #333;">
			<div class="weui_cell_hd">
				<label for="date" class="weui_label" style="width: 100px;">所在地区：</label>
			</div>
			<div class="weui_cell_bd weui_cell_primary">
				<input class="weui_input" id="area" name="area" type="text" value="${address.province.name } ${address.city.name } ${address.county.name }">
			</div>
		</div>
		<div class="weui_cell zc1">
			<div class="weui_cell_hd">
				<label class="weui_label" style="width: 100px; color: #333;">详细地址：</label>
			</div>
			<div class="weui_cell_bd weui_cell_primary">
				<input id="address" name="address" class="weui_input" type="text" placeholder="请输入详细地址" value="${address.address }">
			</div>
		</div>
		<div class="weui_cell zc1">
			<div class="weui_cell_hd" style="width: 100%; color: #333;">
				<label class="weui_label" style="width: 160px; color: #333; float: left;">设置为默认地址：</label>
				<c:if test="${address.isDefault == 0 }">
					<input type="checkbox" id="setdefault" name="setdefault" style="float: right; margin-right: 30px; margin-top: 20px;">
				</c:if>
				<c:if test="${address.isDefault == 1 }">
					<input type="checkbox" checked disabled id="setdefault" name="setdefault" style="float: right; margin-right: 30px; margin-top: 20px;">
				</c:if>
				<input type="hidden" id="isDefault" name="isDefault" value="${address.isDefault }" />
			</div>
		</div>
	</div>
	<div>
	<p id="jsonstr"></p>
	</div>
	<div class="tabm">
		<a class="tabright" href="javascript:;" onclick="saveEdit()" style="width: 100%;">保存</a>
	</div>
</body>